#Pedestrian_server接口文档
xxxxxxxxxxPedestrian_server通过http协议监听29000端口,提供业界标准的Web Service API,供其他程序调用。Pedestrian_server具有如下特点:1.与浏览器无关2.提供标准的http get post接口3.数据编码Utf-8
接口调用
xxxxxxxxxxHTTP Gethttp://127.0.0.1:29000/pedestrian/init>接口返回{"code":0, //见附录1错误码。"data":"", 。"error":"" //失败的错误信息}
接口调用
xxxxxxxxxxHTTP Gethttp://127.0.0.1:29000/pedestrian/uninit>接口返回{"code":0, //0:表示成功,1:表示失败。"data":"", //成功时返回对应的卡号。"error":"" //失败的错误信息}
接口调用
xxxxxxxxxxHTTP Posthttp://127.0.0.1:29000/pedestrian/detect>接口返回{"code":0, //0:表示成功,1:表示失败。"data":[{"index":0,"left":30,"right":40,"top":30,"bottom":40,"prob":0.4,"age":1,"sex":1,"bag":"1","glass":1,"hat":1,"mask":1,"clothestexture":1,"clothescolor":1,"sleeve":1,"trousers":1,"trousersColor":1},{"index":1,"left":30,"right":40,"top":30,"bottom":40,"prob":0.4,"age":1,"sex":1,"bag":"1","glass":1,"hat":1,"mask":1,"clothestexture":1,"clothescolor":1,"sleeve":1,"trousers":1,"trousersColor":1}],"error":""//失败的错误信息}
错误码如下表所示
| 错误码 | 说明 |
|---|---|
| 0 | 成功 |
| -1 | 引擎没有初始化 |
| -2 | 无效参数 |
| -3 | 无效的图像 |
| -10000 | 加载动态库失败 |
| -10001 | 请求方式不支持 |
| -10002 | 无效json字符串 |
| -10004 | post的数据无效 |
| -10005 | 正在操作 |
| -10006 | 接口不支持 |
| -10007 | 图片解析失败 |
| -10008 | 捕获到异常 |
| -10009 | 算法未初始化 |
| -10010 | json 参数无效 |
| -10011 | 图片二次解析失败 |